import reqeust from "@/utils/http"

//加入购物车
export const insertCartAPI = ({ skuId, count }) => {
  return reqeust({
    url: "/member/cart",
    method: "post",
    data: {
      skuId,
      count
    }
  })
}

//获取购物车列表
export const getCartListAPI = () => {
  return reqeust({
    url: "/member/cart"
  })
}

//合并本地购物车和接口购物车列表
export const mergeCartAPI = (data) => {
  return reqeust({
    url: "/member/cart/merge",
    method: "post",
    data
  })
}